from django.contrib import admin
from .models import Tag,Log,Category

@admin.register(Category)
class CategoryAdmin(admin.ModelAdmin):
    list_display = ('id', 'name')

@admin.register(Tag)
class TagAdmin(admin.ModelAdmin):
    list_display = ('id', 'name')

@admin.register(Log)
class LogAdmin(admin.ModelAdmin):
    list_display = ('id','title','date','time','category')
    list_filter = ('date',)
    search_fields = ('title','date','body')
    date_hierarchy = 'date'
    ordering = ('-date','-time')
    list_display_links = ('id', 'title')
